<?php
/**
 * Created by PhpStorm.
 * User: liangtiehui
 * Date: 2015/12/29
 * Time: 22:40
 */

namespace Builder;

/**
 * 产品类
 * Class Product
 * @package Builder
 */
class Product
{
    private $_parts;

    public function __construct(){
        $this->_parts = array();
    }

    public function add($part) {
        return array_push($this->_parts, $part);
    }

    public function show() {
        echo "the product include <br/>";
        array_map('printf', $this->_parts);
    }
}